/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.business.service;

import me.zhengjie.business.domain.Zhsq;
import me.zhengjie.business.domain.vo.ZhgkZpbhVo;
import me.zhengjie.business.service.dto.ZhsqDto;
import me.zhengjie.business.service.dto.ZhsqQueryCriteria;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import java.util.Map;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import javax.transaction.Transactional;

/**
* @website https://el-admin.vip
* @description 服务接口
* @author xiahongbo
* @date 2022-04-15
**/
public interface ZhsqService {
    /**
     * 查询数据分页
     * @param criteria 条件
     * @param pageable 分页参数
     * @return Map<String,Object>
     */
    Page<Zhsq> queryAll(ZhsqQueryCriteria criteria, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param criteria 条件参数
    * @return List<ZhsqDto>
    */
    List<ZhsqDto> queryAll(ZhsqQueryCriteria criteria);

    /**
     * 自定义查询待复核列表
     * @return Map<String,Object>
     */
    Object querySelfAssess(String name, String sbgsId, int[] startEnd);

    /**
     * 根据ID查询
     * @param bisZhsqId ID
     * @return ZhsqDto
     */
    ZhsqDto findById(Long bisZhsqId);

    /**
    * 创建
    * @param resources /
    * @return ZhsqDto
    */
    ZhsqDto create(Zhsq resources, String ids);

    /**
     * 编辑
     * @param resources /
     */
    ZhsqDto update(Zhsq resources, String ids);

    /**
     * 创建
     * @param resources /
     * @return ZhsqDto
     */
    ZhsqDto submitZhsq(Zhsq resources, String ids);

    /**
    * 编辑
    * @param resources /
    */
    ZhsqDto update(Zhsq resources);

    /**
     * 手机端评估居家照护
     * @param zt 状态
     * @param id 主键
     */
    void updateZhzt(String zt, Long id,String bz);

    /**
     * 手机端评估机构照护
     * @param zt 状态
     * @param id 主键
     */
    void checkPgjgzh(String zt, Long id,String bz);
    void updatePcZhzt(String zt, Long id, String bz);
    ZhsqDto updateFhZhzt(String zt, Long id, String bz);
    void checkPgPcjgzh(String zt, Long id, String bz, Zhsq resources);
    void checkJbzxZhsq(String zt, Long id, String bz, Zhsq resources);

    void cancelZhsq(String cause, Long id);

    void update(String tjrq, Long id);
    /**
    * 多选删除
    * @param ids /
    */
    void deleteAll(Long[] ids);

    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
    void download(List<ZhsqDto> all, HttpServletResponse response) throws IOException;

    /**
     * 导出已复核数据
     * @param all 待导出的数据
     * @param response /
     * @throws IOException /
     */
    void downloadComplete(List<ZhsqDto> all, HttpServletResponse response) throws IOException;

    /**
     * 导出自评驳回
     * @param all 待导出的数据
     * @param response /
     * @throws IOException /
     */
    void downloadZpbhList(List<ZhgkZpbhVo> all, HttpServletResponse response) throws IOException;
    /**
     * 导出未分配的居家照护
     * @param all 待导出的数据
     * @param response /
     * @throws IOException /
     */
    void downloadHomeApprove(List<ZhsqDto> all, HttpServletResponse response) throws IOException;

    /**
     * 根据身份证和待遇日期查询zhid
     * @param bisZhsqSnrySfz
     * @return ZhsqDto
     */
    ZhsqDto queryZhid(String bisZhsqSnrySfz, String hljgbm);
    ZhsqDto queryBySfz(String bisZhsqSnrySfz);


    /**
     * 自评驳回列表
     * @param blurry
     * @param area
     * @param sbgsId
     * @param pageable
     * @return
     */
    Map<String, Object> queryZpbhList(String blurry, String area, String sbgsId, Pageable pageable);

    /**
     * 自评驳回列表
     * @param blurry
     * @param area
     * @param sbgsId
     * @return
     */
    List<ZhgkZpbhVo> queryZpbhList(String blurry, String area, String sbgsId);

    Object updateById(String orderId);

    /**
     * 计算机构延期天数
     * @param zhid
     * @return
     */
    Integer calculateOrgDelayDays(Long zhid);

    String getFpTargetDate(Long zhid);

    List<Map<String, Object>> getPdfScore(String zhsqId);
}
